/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.openmrs.module.basicmodule.DSS.Interpreter.Function.Time;
import org.openmrs.module.basicmodule.DSS.Interpreter.DSSObservation;
import org.openmrs.module.basicmodule.DSS.Interpreter.Function.Function;
import java.util.ArrayList;
import org.openmrs.module.basicmodule.DSS.Interpreter.InterpreterVisitor;
import org.openmrs.module.basicmodule.DSS.ast.AST;
/**
 *
 * @author David
 */
public class TimeFunction extends Function {

    @Override
    public Object execute(ArrayList args) {
        
        DSSObservation obs = (DSSObservation) ((AST)args.get(0)).accept(new InterpreterVisitor());
        return obs.getDate();
    }
}
